const Joi = require('@hapi/joi')

const schema = Joi.array()
  .ordered(
    Joi.string()
      .min(5)
      .max(10)
      .required(),
    Joi.number()
      .min(0)
      .max(5)
      .integer()
      .required()
  )
  .items(Joi.number())

const validateConfig = { allowUnknown: true, abortEarly: false }

let validateFn = validate => {
  let result = schema.validate(validate, validateConfig)
  console.log(result)
}

let input = ['12345', 3, 1]

validateFn(input)
